package cn.tedu.boot35.mapper;

import cn.tedu.boot35.entity.Emp;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface EmpMapper {

    @Insert("insert into iemp values(null,#{name},#{sal},#{job})")
    void insert(Emp emp);

    @Select("select *from iemp ")
    List<Emp> select();

    @Update("update iemp set name=#{name},sal=#{sal},job=#{job} where id=#{id}")
    void update(Emp emp);

}
